# -*- encoding:utf-8 -*-
# !/usr/bin/env python
'''
    python-0817-05.py
    ======================
    @descript:
    @copyright:nnz
    @author:dln
    @date: 2021/8/17 17:05
    @version:v1.0
'''
class Animal:
    def __init__(self,p_leg):
        self.checkleg(p_leg=4)
        pass
    @property
    def leg(self):
        return self.leg
    @leg.setter
    def leg(self,p_leg):
        self.checkleg(p_leg)
        pass
    def checkleg(self,p_leg):
        self.v_leg=p_leg
        if p_leg%2==0:
            self.v_leg=p_leg
        else:
            raise
            pass
        pass
    class AnimalLegException(Exception):
        pass
object01=Animal()
print('对象object01的个数为{}'.format(object01.leg))


